﻿@model Eoffice.Models.CVDEN

@{
    ViewBag.Title = "THÊM CÔNG VĂN ĐẾN";
    Layout = "~/Views/Shared/_LayoutPage.cshtml";
}

<h1>@ViewBag.Title</h1>

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <table class="TableUpdate" border="1">
        <tr>
            <td class="Control" colspan="2">
                <ul>
                    <li>
                        <input type="submit" value="Ghi lại" class="uupdate" />
                    </li>
                    <li>@Html.ActionLink("Trở về", "Index", "", new { @class = "uback" })</li>
                </ul>
            </td>
        </tr>
        @*<tr>
                <th>STT</th>
                <td>@Html.TextBoxFor(model => model.STTCV) @Html.ValidationMessageFor(model => model.STTCV)</td>
            </tr>*@
        <tr>
            <th>SỐ/KÝ HIỆU CVĐẾN</th>
            <td>@Html.TextBoxFor(model => model.SOCV)  @Html.ValidationMessageFor(model => model.SOCV)</td>
        </tr>
        <tr>
            <th>NGÀY THÁNG</th>
            <td>@Html.TextBoxFor(model => model.NGAYCVDEN) @Html.ValidationMessageFor(model => model.NGAYCVDEN)</td>
        </tr>
        <tr>
            <th>LĨNH VỰC</th>
            <td>@Html.DropDownList("MALV", String.Empty) @Html.ValidationMessageFor(model => model.MALV)</td>
        </tr>
        <tr>
            <th>LOẠI CÔNG VĂN</th>
            <td>@Html.DropDownList("MALOAI", String.Empty) @Html.ValidationMessageFor(model => model.MALOAI)</td>
        </tr>
        <tr>
            <th>NHÂN VIÊN</th>
            <td>@Html.DropDownList("MSNV", String.Empty)  @Html.ValidationMessageFor(model => model.MSNV)</td>
        </tr>
        <tr>
            <th>CƠ QUAN</th>
            <td>@Html.DropDownList("MACQ", String.Empty)  @Html.ValidationMessageFor(model => model.MACQ)</td>
        </tr>

        <tr>
            <th>NGÀY VÀO SỔ</th>
            <td>@Html.TextBoxFor(model => model.NGAYVAOSO) @Html.ValidationMessageFor(model => model.NGAYVAOSO)</td>
        </tr>
        <tr>
            <th>NGƯỜI VIẾT</th>
            <td> @Html.TextBoxFor(model => model.NGUOIKY) @Html.ValidationMessageFor(model => model.NGUOIKY)</td>
        </tr>
        <tr>
            <th>TRÍCH YẾU</th>
            <td>@Html.TextAreaFor(model => model.TRICHYEUCVDEN, new { @class = "trichyeu" }) @Html.ValidationMessageFor(model => model.TRICHYEUCVDEN)</td>
        </tr>
        <tr>
            <th>GHI CHÚ</th>
            <td>@Html.TextAreaFor(model => model.GHICHU, new { @class = "ghichu" }) @Html.ValidationMessageFor(model => model.GHICHU)</td>
        </tr>
        <tr>
            <th>FILE ĐÍNH KÈM</th>
            <td>
                @Html.TextBoxFor(model => model.FILE, new { @class = "text" })
            <input id="SelectFILE" type="button" value="Chọn File" class="bottom" />
        </td>
    </tr>

    <tr>
        <td class="Control" colspan="2">
            <ul>
                <li>
                    <input type="submit" value="Ghi lại" class="uupdate" />
                </li>
                <li>@Html.ActionLink("Trở về", "Index", "", new { @class = "uback" })</li>
            </ul>
        </td>
    </tr>
</table>
}
<script type="text/javascript">
    $(function () {
        $("#NGAYCVDEN").datepicker({
            dateFormat: 'dd/mm/yy',
            changeYear: true,
            changeMonth: true
        });
        $("#NGAYVAOSO").datepicker({
            dateFormat: 'dd/mm/yy',
            changeYear: true,
            changeMonth: true
        });
    });
</script>

<script type="text/javascript">
    var editor;
    function createEditor(languageCode, id) {
        var editor = CKEDITOR.replace(id, {
            language: languageCode
        });
    }
    $(function () {
        createEditor('vi', 'TRICHYEUCVDEN');

    });
</script>

<script type="text/javascript">
    $(function () {
        $("#SelectFILE").click(function () {
            var finder = new CKFinder();
            finder.selectActionFunction = function (fileUrl) {
                $("#FILE").val(fileUrl);
            };
            finder.popup();
        });
    });
</script>